#include<iostream>

using namespace std;



//基类，设置宽高
class shape {
public:
	void print()
	{
		printf("Hello World!");
	}

	void SetWidth(int w) 
	{
		width = w;
	}

	void SetHeight(int h)
	{
		height = h;
	}

protected:
//private:
	int width;
	int height;
};


class Price {
public:
	int TotalPrice(int area)
	{
		return area * 70;
	}
};

//派生类，继承基类非私有成员，即可访问基类非私有成员
class RectAngle :public shape,public Price
{
public:
	int GetArea()
	{
		return (width * height);
	}
};
